#!/bin/bash

echo "Testing build of autoware_ground_segmentation package..."

# Check if we're in a catkin workspace
if [ ! -f "CMakeLists.txt" ]; then
    echo "Error: CMakeLists.txt not found. Please run this script from the package directory."
    exit 1
fi

# Try to build
echo "Attempting to build package..."
mkdir -p build
cd build
cmake ..
make -j4

if [ $? -eq 0 ]; then
    echo "Build successful!"
    echo "You can now install the package or run it directly."
else
    echo "Build failed. Please check the error messages above."
    exit 1
fi 